package zuoye;

import util.Util;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Findjpanel extends JPanel implements ActionListener {

    private Icon sureimage = Util.getIcon("/images/buttonSure.jpg");
    private JButton SurejButton;
    private Mainjframe frame;
    private JLabel jLabel1 = new JLabel();

    public Findjpanel(Mainjframe frame) {
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);
        int a = frame.getIndex();
        JLabel jLabel = new JLabel("您所剩余额为：");
        jLabel.setForeground(Color.BLACK);
        jLabel.setFont(new Font("宋体",Font.BOLD,26));
        jLabel.setBounds(360, 460, 200, 40);
        this.add(jLabel);


        jLabel1.setForeground(Color.BLACK);
        jLabel1.setFont(new Font("宋体",Font.BOLD,26));
        jLabel1.setBounds(600, 460, 200, 40);
        this.add(jLabel1);

        SurejButton = new JButton(sureimage);
        SurejButton.setBounds(544, 520, 140, 50);
        this.add(SurejButton);
        SurejButton.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == SurejButton) {
            frame.switchPanel("menu");
        }
    }

    public JLabel getjLabel1() {
        return jLabel1;
    }

    public void setjLabel1(JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }
}
